/**
 * Driver pour la librairie Prototype
 */
var PrototypeDriver = function() {
	
	this.getElemById = function(id) {
		return $(id);
	};
	
	this.getElemsByCSSRule = function(cssrule) {
		return $$(cssrule);
	};
	
	this.onready = function(f) {
		return document.observe("dom:loaded",f);
	};
	
	this.on = function(event, element, f, bubbles) {
		return element.observe(event,f, bubbles);
	};
	
	this.addClass = function(element, className) {
		element.addClassName(className);
	};
	this.removeClass = function(element, className) {
		element.removeClassName(className);
	};
	
	this.getCumulativeOffset = function(element) {
		return element.cumulativeOffset();
	};
	
	this.serializeObject = function(element) {
		return element.serialize({hash: true});
	};
};

JSD.setDriver(PrototypeDriver);